Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group narrowing commands and improve descriptions #1516

Merged
merged 3 commits into from
Jul 8, 2024

Conversation

Niloth-p
Copy link
Collaborator

@Niloth-p Niloth-p commented Jun 7, 2024

What does this PR do, and why?

  • Groups commands that switch narrows
  • Improves their help descriptions

Outstanding aspect(s)

Feedback on the following are needed:

  • name of the chosen help category
  • order of the commands within the narrowing category
  • help descriptions

External discussion & connections

  • Discussed in #zulip-terminal in re-categorization
  • Fully fixes #
  • Partially fixes issue #
  • Builds upon previous unmerged work in PR #
  • Is a follow-up to work in PR #
  • Requires merge of PR #
  • Merge will enable work on #

How did you test this?

  • Manually - Behavioral changes
  • Manually - Visual changes
  • Adapting existing automated tests
  • Adding automated tests for new behavior (or missing tests)
  • Existing automated tests should already cover this (only a refactor of tested code)

Self-review checklist for each commit

  • It is a minimal coherent idea
  • It has a commit summary following the documented style (title & body)
  • It has a commit summary describing the motivation and reasoning for the change
  • It individually passes linting and tests
  • It contains test additions for any new behavior
  • It flows clearly from a previous branch commit, and/or prepares for the next commit

Visual changes

image

@zulipbot zulipbot added the size: M [Automatic label added by zulipbot] label Jun 7, 2024
docs/hotkeys.md Outdated
Comment on lines 34 to 41
|Narrow to the stream of the current message|<kbd>s</kbd>|
|Narrow to the topic of the current message|<kbd>S</kbd>|
|Narrow to compose box message recipient|<kbd>Meta</kbd> + <kbd>.</kbd>|
|Narrow to a topic/direct-chat, or stream/all-direct-messages|<kbd>z</kbd>|
|Narrow to all messages|<kbd>a</kbd> / <kbd>Esc</kbd>|
|Narrow to all direct messages|<kbd>P</kbd>|
|Narrow to all starred messages|<kbd>f</kbd>|
|Narrow to messages in which you're mentioned|<kbd>#</kbd>|
|Zoom in/out the message's conversation context|<kbd>z</kbd>|
|Go to your combined feed|<kbd>a</kbd> / <kbd>Esc</kbd>|
|Go to your direct message feed|<kbd>P</kbd>|
|Go to your starred messages|<kbd>f</kbd>|
|Go to messages in which you're mentioned|<kbd>#</kbd>|
Copy link
Member

@rsashank rsashank Jun 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure about the language we should use here, but should we consider using "Go to" instead of "Narrow" for lines 34-36 as well? To me, "Go to" seems clearer than "Narrow." However, this is just my opinion, so we'll need to wait for feedback from Neil and the mentors.

The rewording of the to "Zoom in/out" seems great, though!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review!

Ah, good point! Yes, I was considering the same, but I wasn't sure because those narrowing commands kind of use the current context and don't switch to something completely different or a named narrow, like the menu buttons do. But, it's probably just me.
And that's also why line 41 doesn't feel like a great fit either, because it's not a named narrow.
Thank you for sharing your thoughts!

Zoom in/out credits: Zulip webapp

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For context, historically - at least in ZT - we've had confusion over communicating 'a narrow' (message view; noun) and 'narrowing' (switching to a message view; verb).

Most of this likely comes from the phrasing in the code, and also how the API defines a narrow as a filter of the messages you can see: https://zulip.com/api/construct-narrow.
(note we currently use an old API style for narrows, which needs to be refactored to support the documented style which uses a dict)

You can also see this in our user-facing tutorial: https://github.com/zulip/zulip-terminal/blob/main/docs/getting-started.md#Narrowing

So, there's potentially some small follow-up we could do to clarify this for end-users, if we're switching to 'message view' for the noun form.

Regarding the specific verb prefix selection (go-to vs narrow):

  • ideally it would be as concise as possible, as well as consistent
  • some of the contextual grouping we have was originally intended to make it easier to understand based on the category titles, but since the descriptions can appear without them, then we can't assume their presence and simplify that much
  • 'go' is used a lot in the web app descriptions for 'narrowing' (https://zulip.com/help/keyboard-shortcuts)
  • the web app or docs actually don't seem to use narrow for either form? (outside of API)
  • narrowing can change keyboard focus, but we currently use 'go' for the keyboard movement, so that could be confusing when really it's specifically changing the message view

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re z, this is a simple toggleable hotkey in ZT, which we introduced before the web app switched to using just s for doing almost the same. In web it doesn't apply to DMs, so it's not really a 'safe' toggle between views - and I'm not sure if shift s (S) still works. I'm inclined to suggest Toggle could be a good phrase here.

'Zoom in/out' is definitely cleaner, and relates to why we chose z in the first place, but the challenge with the phrasing here has always been how to cleanly describe the different contexts. 'Conversation' seems to be the term used for 'most zoomed in' view at the moment, but DM feed and channel feeds are not quite as clear cut, but might be useful?

(for the reasons above, z should be right next to s/S in the help)

Copy link
Collaborator

@neiljp neiljp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Niloth-p Thanks for this thoughtful work 👍
(and @rsashank's review :+1)

Following up from the changes to eg. have Help Menu and About Menu capitalized similarly, we could also consider doing similar changes to parts of the UI like All Messages and Direct Messages. These could be simple capitalization, or possibly subsequently styled versions, to highlight that they refer to specific defined items.

As per most of this work, the challenge is picking the correct terms and phrases, and using them consistently. That'll likely be easier as we go on, and we may want to discuss those specific terms, including eg. for referring to popups/menus/...

docs/hotkeys.md Outdated
Comment on lines 31 to 33
## Switch message view
|Command|Key Combination|
| :--- | :---: |
|Narrow to the stream of the current message|<kbd>s</kbd>|
|Narrow to the topic of the current message|<kbd>S</kbd>|
|Narrow to compose box message recipient|<kbd>Meta</kbd> + <kbd>.</kbd>|
|Narrow to a topic/direct-chat, or stream/all-direct-messages|<kbd>z</kbd>|
|Narrow to all messages|<kbd>a</kbd> / <kbd>Esc</kbd>|
|Narrow to all direct messages|<kbd>P</kbd>|
|Narrow to all starred messages|<kbd>f</kbd>|
|Narrow to messages in which you're mentioned|<kbd>#</kbd>|
|Next unread topic|<kbd>n</kbd>|
|Next unread direct message|<kbd>p</kbd>|
|Perform current action|<kbd>Enter</kbd>|
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The web app calls this 'Navigation' and includes the n and p keys here.

While that name for the category is short, it doesn't quite seem correct with us supporting left/right navigation too; maybe 'Switching messages view' would be more consistent, at least for now? The title of the middle section is currently the plural form: messages, and we have other '-ing' forms of category titles.

For n and p these can jump inside and between conversations, which suggests something other than 'Switching' for the title (perhaps something closer to 'Navigating' or 'Jumping'), but this seems minor until we fine-tune the View/Narrow/Navigate nuances.

Re moving the Meta + . command here, it's certainly useful to know that it fits in this category, though it could certainly be useful in the other section too - something which I think you have have explored enabling in #1519? Was it for this purpose?

As per discussion in #1497, keeping 'Enter' in 'Navigation' (ie. scrolling/left/right/...) seems good for now. One wrinkle is that in addition to that general-purpose behavior, it would be useful to also include that 'Enter' activates narrowing buttons in the left panel in general, much like the change you've added in another PR for replying to a user in the right (user) panel.

@@ -416,6 +416,7 @@ class KeyBinding(TypedDict):
HELP_CATEGORIES = {
"general": "General",
"navigation": "Navigation",
"narrow": "Switch message view",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This isn't user-facing, but maybe "narrowing" here?

@@ -190,22 +190,22 @@ class KeyBinding(TypedDict):
},
'ALL_MESSAGES': {
'keys': ['a', 'esc'],
'help_text': 'Narrow to all messages',
'help_text': 'Go to your combined feed',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're making this change, we should also update the UI to use Combined Feed at the same time; since these are different changes, they should at least be in different commits - ie. I wouldn't expect a UI rename of that type in this commit. That renaming was discussed in #zulip terminal > Combined feed renaming.

docs/hotkeys.md Outdated
Comment on lines 34 to 41
|Narrow to the stream of the current message|<kbd>s</kbd>|
|Narrow to the topic of the current message|<kbd>S</kbd>|
|Narrow to compose box message recipient|<kbd>Meta</kbd> + <kbd>.</kbd>|
|Narrow to a topic/direct-chat, or stream/all-direct-messages|<kbd>z</kbd>|
|Narrow to all messages|<kbd>a</kbd> / <kbd>Esc</kbd>|
|Narrow to all direct messages|<kbd>P</kbd>|
|Narrow to all starred messages|<kbd>f</kbd>|
|Narrow to messages in which you're mentioned|<kbd>#</kbd>|
|Zoom in/out the message's conversation context|<kbd>z</kbd>|
|Go to your combined feed|<kbd>a</kbd> / <kbd>Esc</kbd>|
|Go to your direct message feed|<kbd>P</kbd>|
|Go to your starred messages|<kbd>f</kbd>|
|Go to messages in which you're mentioned|<kbd>#</kbd>|
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For context, historically - at least in ZT - we've had confusion over communicating 'a narrow' (message view; noun) and 'narrowing' (switching to a message view; verb).

Most of this likely comes from the phrasing in the code, and also how the API defines a narrow as a filter of the messages you can see: https://zulip.com/api/construct-narrow.
(note we currently use an old API style for narrows, which needs to be refactored to support the documented style which uses a dict)

You can also see this in our user-facing tutorial: https://github.com/zulip/zulip-terminal/blob/main/docs/getting-started.md#Narrowing

So, there's potentially some small follow-up we could do to clarify this for end-users, if we're switching to 'message view' for the noun form.

Regarding the specific verb prefix selection (go-to vs narrow):

  • ideally it would be as concise as possible, as well as consistent
  • some of the contextual grouping we have was originally intended to make it easier to understand based on the category titles, but since the descriptions can appear without them, then we can't assume their presence and simplify that much
  • 'go' is used a lot in the web app descriptions for 'narrowing' (https://zulip.com/help/keyboard-shortcuts)
  • the web app or docs actually don't seem to use narrow for either form? (outside of API)
  • narrowing can change keyboard focus, but we currently use 'go' for the keyboard movement, so that could be confusing when really it's specifically changing the message view

docs/hotkeys.md Outdated
Comment on lines 34 to 41
|Narrow to the stream of the current message|<kbd>s</kbd>|
|Narrow to the topic of the current message|<kbd>S</kbd>|
|Narrow to compose box message recipient|<kbd>Meta</kbd> + <kbd>.</kbd>|
|Narrow to a topic/direct-chat, or stream/all-direct-messages|<kbd>z</kbd>|
|Narrow to all messages|<kbd>a</kbd> / <kbd>Esc</kbd>|
|Narrow to all direct messages|<kbd>P</kbd>|
|Narrow to all starred messages|<kbd>f</kbd>|
|Narrow to messages in which you're mentioned|<kbd>#</kbd>|
|Zoom in/out the message's conversation context|<kbd>z</kbd>|
|Go to your combined feed|<kbd>a</kbd> / <kbd>Esc</kbd>|
|Go to your direct message feed|<kbd>P</kbd>|
|Go to your starred messages|<kbd>f</kbd>|
|Go to messages in which you're mentioned|<kbd>#</kbd>|
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re z, this is a simple toggleable hotkey in ZT, which we introduced before the web app switched to using just s for doing almost the same. In web it doesn't apply to DMs, so it's not really a 'safe' toggle between views - and I'm not sure if shift s (S) still works. I'm inclined to suggest Toggle could be a good phrase here.

'Zoom in/out' is definitely cleaner, and relates to why we chose z in the first place, but the challenge with the phrasing here has always been how to cleanly describe the different contexts. 'Conversation' seems to be the term used for 'most zoomed in' view at the moment, but DM feed and channel feeds are not quite as clear cut, but might be useful?

(for the reasons above, z should be right next to s/S in the help)

@neiljp neiljp added the PR awaiting update PR has been reviewed & is awaiting update or response to reviewer feedback label Jun 23, 2024
@zulipbot zulipbot added size: L [Automatic label added by zulipbot] and removed size: M [Automatic label added by zulipbot] labels Jun 24, 2024
@Niloth-p
Copy link
Collaborator Author

Niloth-p commented Jun 24, 2024

I've made the following changes:

1st commit

  • Re-ordered to s, S, z, Meta .
  • User-facing category name: "Switch message view" -> "Switching messages view"
  • Internal category name: "narrow" -> "narrowing"

2nd commit

  • The previous PR version used "Go to", this version uses "View" and "View all". Please refer to the commit description for details.

Follow-ups to address in separate commits / PRs:

  • All Messages -> Combined Feed everywhere
    • All DMs -> your DM feed or equivalent
  • Replace "narrow" with "message view" or others in user-facing documentation like the user tutorial.
  • Consider casefix changes to parts of the UI like - All Messages and Direct Messages
    I didn't do this as part of the 2nd commit because it makes sense grammatically, without marking them as proper nouns. We could do that when we start using "Feed" terminology?
  • Add a new key binding mentioning that 'Enter' activates narrowing buttons
    I don't see this help text properly fitting in any category that we have at the moment, and general is just too broad.
    We could instead not add this to a category, but just add it to a context, following the discussions in CZO topics Restructure Key Bindings? and Supporting Help Multi-categories #T1519.
    We have the ACTIVATE_BUTTON key binding at the moment.
  • I've used a mention of 'PM' in the help text. I know that we ideally want to use DMs and key it in with ZFL, but hopefully we can handle that as a follow-up PR too, as we're currently using PM everywhere in the code base.
  • Return to n & p later after fine-tuning the View/Narrow/Navigate nuances.

Please let me know if I've missed anything or misunderstood something, @neiljp.

@Niloth-p Niloth-p removed the PR awaiting update PR has been reviewed & is awaiting update or response to reviewer feedback label Jun 24, 2024
Copy link

@zormit zormit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me this looks very fine. I won't think about wording too much/too deeply, I think it's improving in this PR and that's the most important thing to me :) Neil had already a look, so I'll leave the details to him.

@Niloth-p
Copy link
Collaborator Author

Niloth-p commented Jul 7, 2024

Note: The "Narrow to compose box message recipient" command that we just assigned to category "compose_box" in #1520 is now re-assigned to category "narrowing".
Comparing the 2 categories, I think the "narrowing" category is a better fit, as the compose box relation can be covered with the contextual help when added.

@neiljp
Copy link
Collaborator

neiljp commented Jul 7, 2024

@Niloth-p Thanks for the rebase 👍 I agree about the narrowing category, certainly until we consider multi-categories (if we do).

It would seem that n/p would also be best in this same category for now? That is, compared to others that will be present in the short term?

The meta . change has issues:

  • it changes to any conversation, not just DMs/PMs
  • if it was DMs/PMs only, the UI itself should all be expressed as 'Direct' by now
  • 'Open PM' reads strangely to me, but given the above it can be changed in any case

I believe those were the two points I had noticed and was starting to work through before you pushed again this evening :)

To make the 'z' hotkey be listed immediately after the related 's' and
'S' hotkeys in the help menu.
@Niloth-p Niloth-p force-pushed the category/1516-narrowing/pr branch from b1ea99b to 8f3dd49 Compare July 7, 2024 13:25
@Niloth-p
Copy link
Collaborator Author

Niloth-p commented Jul 7, 2024

  1. Grouped 'p' and 'n' into the 'narrowing' category.

  2. Oops, thank you!
    I've rephrased it to "Switch message view to the compose box target". I felt 'recipient' could be made a bit more user-friendly.

  3. I noticed that I had somehow had missed the re-ordering changes while rebasing on merges, at some point of time. So, I created a separate commit for that and kept it in the middle, so that it can be squashed into either the first or the last, if necessary.

  4. Updated the commit descriptions.

Replace "Narrow to":
- Use "View" instead of "Narrow to"
- Use "View all" for those corresponding to narrow buttons
- Use "Switch message view" for the compose box message recipient

Rephrasing help texts:
- Use "zoom in/out" to simplify and shorten the longest description,
  while also being clear on the choice of key being 'z'
- "compose box message recipient" -> "compose box target" reduces length
  and user-friendliness, while retaining clarity

Hotkeys document regenerated.
@neiljp neiljp removed the PR needs review PR requires feedback to proceed label Jul 8, 2024
@neiljp neiljp force-pushed the category/1516-narrowing/pr branch from 8f3dd49 to 70032a5 Compare July 8, 2024 04:49
@neiljp neiljp added this to the Next Release milestone Jul 8, 2024
@neiljp neiljp added the PR ready to be merged PR has been reviewed & is ready to be merged label Jul 8, 2024
@neiljp
Copy link
Collaborator

neiljp commented Jul 8, 2024

@Niloth-p Thanks for the update 👍 I partially reversed the mentions text, but that's a marginal language change, and otherwise I just tweaked the commit text.

The middle commit is small, but helps keep the reordering clear, since the diff is less clear otherwise, so I've left it separate 👍

Merging this now, thanks all! 🎉

@neiljp neiljp merged commit 66c74ba into zulip:main Jul 8, 2024
21 checks passed
@neiljp
Copy link
Collaborator

neiljp commented Jul 8, 2024

I've added the follow-up points you noted above as a summary into the bottom of #1524 to keep them tracked, as well as a few other points.

@Niloth-p Niloth-p deleted the category/1516-narrowing/pr branch July 8, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR ready to be merged PR has been reviewed & is ready to be merged size: L [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants